/**
 * 新增-资产信息js
 */

$(function () {
	initialPage();
});

function initialPage() {
	
	$.get(
		"/sys/banktype/typeNames",
		function(data) {
			var rows = data.rows;
			var html = '';
			for (var i = 0; i < rows.length; i ++) {
				html += `<option value='${rows[i]}'> ${rows[i]} </option>`;
			}
			$("#addBankType").append(html);
		},
		"json"
	);
}

var vm = new Vue({
	el:'#dpLTE',
	data: {
		bank: {
			id: 0
		},
		rows:[]
	},
	methods : {
		acceptClick: function() {
			if (!$('#form').Validform()) {
		        return false;
		    }
		    $.SaveForm({
		    	url: '../../sys/bank/save?_' + $.now(),
		    	param: vm.bank,
		    	success: function(data) {
		    		$.currentIframe().vm.load();
		    	}
		    });
		}
	}
})
